package com.lanou3g.dllo.baidumusic.musiclibrary.mv;

import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.widget.MediaController;
import android.widget.VideoView;

import com.lanou3g.dllo.baidumusic.R;
import com.lanou3g.dllo.baidumusic.base.BaseActivity;

/**
 * Created by dllo on 16/6/29.
 */
public class MvActivity extends BaseActivity{

    private VideoView myVideoView;

    @Override
    public int setLayout() {
        return R.layout.activity_video;
    }

    @Override
    public void initView() {
        myVideoView = (VideoView) findViewById(R.id.myVideoView);

    }

    @Override
    public void initData() {
        String url = getIntent().getStringExtra("video");
        myVideoView.setMediaController(new MediaController(this));
        myVideoView.setVideoURI(Uri.parse(url));
        myVideoView.start();
    }
}
